<?
imageViews("./"); 
echo "hallo";

///*  FUNKTIONEN *///


	function imageViews($dir) {
	  
	  $noTitle = 0;
	  $noDesc = 0;
	
	  $fh = opendir($dir);
	  echo "<ul class=\"fileTree\">\n";
	  while($entry = readdir($fh)) {
		if($entry == ".." || $entry == "." || $entry == "content_alt.php" || $entry == "content.php")
		  continue;
		//if(is_dir($dir . $entry))
		 //imageViews($dir . $entry . "/");
		else {
			  if(stripos( $entry , ".php" ) !== FALSE && !stripos( $entry , ".LCK" ) !== FALSE){
			  
			  
				  $str = join('', file($dir.$entry));	
				  //$str = ch_uml($str);
				  
				  if (!preg_match("=\<\!\-\-.no_search.\-\-\>=siU", $str)) {
				  		
				  		$array = array();
				  		
					  
					  echo "<h1>$entry</h1><p>";
					  
					  preg_match_all ( "=<img.*/>=siU" , $str, $array[]);
					  
					  //var_dump($array);
					
					  foreach($array as $array1){
					  foreach($array1 as $array2){
					  foreach($array2 as $data){
					  	echo "<p class=\"inarr\">".$data."</p>\n";
					  	preg_match('=alt\="(.*)"=siU', $data, $string);
					  	echo $string[1];
					  }}}
					  
					
					  echo "</p>";

					$eintraege = $array[0];
	

				   }
			  }
		  }
	  }
	  echo "</ul>\n";
	  closedir($fh);
	  
	  echo "<p>noTitle: ".$noTitle."noDesc: ".$noDesc."</p>";
	}

?>
